# Replication package for "Energy Transition, Financial Markets and EU Interventionism: Lessons from the Ukraine Crisisy"
## Patrick Bayer, Lorenzo Crippa, and Federica Genovese
### _Political Science Research & Methods_, 2025

This file contains instructions on how to execute the code contained in the replication package and replicate the results contained in the main text and Online Appendix of the paper. For any query, please do not hesitate to reach out to the software curator, Lorenzo Crippa ([crippa.lnz@gmail.com](mailto:crippa.lnz@gmail.com)).

# Software specifications

The replication package folder contains an Rproject file called `BCG_Ukraine_PSRM_2025.Rproj`. Users can run all codes by simply opening this project in RStudio. That way, they do not have to set working directories manually.

The replication package runs entirely in R. All scripts have been executed on R version 4.4.2 (2024-10-31), on a MacBook Air M3 2024 (Platform aarch64-apple-darwin20), running under macOS Sequoia 15.6.1.

Several R packages are necessary in order to fully execute the code and generate all outputs. Full details on the packages necessary, as well as their versions, are reported in the file `sessionInfo.txt` which sits in the main directory. **WARNING**: in order to ensure the code runs smoothly, the user should ensure packages run on the versions specified in `sessionInfo.txt`.

# Appendix and codebook

The replication package folder contains two PDFs: `BCG_Ukraine_PSRM_2025_appendix.pdf` (which reports the full Online Appendix) and `BCG_Ukraine_PSRM_2025_codebook.pdf` (which reports the codebook and details all variables contained in all data files used).

# Folder description

The replication package folder contains the following subfolders:

- `aux`: contains auxiliary code that serve the estimation or event windows. These scripts are sourced by the scripts in `code` and should not be executed on their own

	- `aux/estimation.R` wraps the `estimation` function that is used in the first phase of the analysis (estimation window).

	- `aux/event.R` wraps two functions: `estim_diff` and `estim_car_diff` that are used in the second phase of the analysis (event window).

- `code`: contains all scripts necessary to run the analysis. Scripts should be run in the order in which they are numbered.

	- `code/01_estimation_window.R` sources stock market data and runs the estimation window phase in several versions (for robustness). 

	- `code/02_event_window.R` performs the event window phase and produces all results reported in the main text and online appendix.

- `data`: contains all data files that are inputs of the included scripts.
	
	- `data/prices.csv.gz` contains daily stock market information for 600 European and non-European fossil fuel and renewable energy firms (long format)

	- `data/indexes.csv.gz` contains daily returns to individual S&P 500 constituent firms and aggregate market indexes (wide format)
	
	- `data/indexes_stoxx600.csv.gz` contains daily returns to individual Stoxx600 constituent firms (wide format)

	- `data/value_SP500.csv.gz` contains daily stock value of S&P 500 composite index (long format)
	
	- `data/Voeten2025_overlap.csv` contains names of firms in Voeten's (2025, JOP) sample that overlap with ours

- `data_out`: contains all data files that are outputs of the scripts. 

	- `data_out/placeholder.txt` is an empty file that allows the folder to be generated when downloading the replication package.

- `plots`: stores the plots generated by `code/02_event_window.R`
	
	- `plots/placeholder.txt` is an empty file that allows the folder to be generated when downloading the replication package.

- `tables`: stores the tables generated by `code/02_event_window.R`
	
	- `estim/placeholder.txt` is an empty file that allows the folder to be generated when downloading the replication package

